<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="sf"%>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="ie6 ielt8"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="ie7 ielt8"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<title>用户登录</title>
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath }/resources/csses/login.css" />
</head>
<body>
	<div class="container">
		<section id="content">
			<sf:form action="${pageContext.request.contextPath }/login"
				method="post">
				<h1>用户登录</h1>
				<c:if test="${param.error != null}">
					<p style="color: red">用户名或者密码错误</p>
				</c:if>
				<c:if test="${ param.logout != null }">
					<p>已成功登出</p>
				</c:if>
				<div>
					<input type="text" placeholder="Username" id="userName"
						name="username" />
				</div>
				<div>
					<input type="password" placeholder="Password" id="password"
						name="password" />
				</div>
				<div>
					<input type="submit" value="Log in" /> <a href="#">Lost your
						password?</a> <a href="${pageContext.request.contextPath }/register">Register</a>
				</div>
				<input type="hidden" name="${_csrf_parameterName }"
					value="${ _csrf_token }">
			</sf:form>
			<!-- form -->
			<!-- <div class="button">
				<a href="#">Download source file</a>
			</div> -->
			<!-- button -->
		</section>
		<!-- content -->
	</div>
	<!-- container -->
</body>
</html>